package routers

import (
	"github.com/astaxie/beego"
	"ktvserver/webserver/controllers"
)

func init() {
	//beego.SetStaticPath("/static", "SYSTEM/static")
	//beego.DelStaticPath("/static")
	beego.InsertFilter("/static/*", beego.BeforeStatic, controllers.FilterStatic)
	//beego.Router("/static/*", &controllers.StaticController{})
	beego.Router("/login", &controllers.LoginController{})
	beego.Router("/logout", &controllers.LogoutController{})
	beego.Router("/ktv/online/:offset", &controllers.OnlineController{})
	beego.Router("/ktv/online", &controllers.OnlineController{})
	beego.Router("/ktv/onlinedata/:offset", &controllers.OnlineContentController{})
	beego.Router("/ktv/detail/:token", &controllers.DetailController{})
	beego.Router("/profile", &controllers.ProfileController{})
	beego.Router("/ktv/status", &controllers.StatusController{})
	beego.Router("/ktv/ddns", &controllers.DdnsController{})
	beego.Router("/", &controllers.MainController{})

	beego.Errorhandler("404", controllers.NotFound)
}
